/**********************************************************************************
 * Code license:  GNU General Public License v3                                   *
 * Main page:     https://code.google.com/p/library-cross-platform/               *
 * Issue tracker: https://code.google.com/p/library-cross-platform/issues/list    *
***********************************************************************************/

package library.parser;

import library.util.*;

public abstract class ParserEvent  extends EventHandler {
  private StringBuilder rawDataString                   = null;

  protected static final int FILE_RESULT_OK             = 0;
  protected static final int FILE_RESULT_IO_EXCEPTION   = 1;
  protected static final int FILE_RESULT_EOF            = 2;
  protected static final int FILE_RESULT_NULL_POINTER   = 3;
  protected static final int FILE_RESULT_SIZE_ZERO      = 4;
  protected static final int FILE_RESULT_UNKNOWN        = 5;

	
  protected abstract int readRawData(StringBuilder string);
  protected abstract int readRawData();
  protected abstract boolean isComment();
  protected abstract boolean eos(char c); //check is end-of string

  protected StringBuilder getRawData() {
    return rawDataString;
  }

  protected void setRawData(StringBuilder string) {
    rawDataString = string;
  }
  protected void clearRawData() {
    rawDataString.setLength(0);
  }
}
